Skip to content

Add named query quiet mode to hide query text during execution#1551

Merged
j-bennet merged 3 commits intodbcli:mainfrom
godtechwak:pgcli/bumhwaklee
Jan 17, 2026
Merged

Add named query quiet mode to hide query text during execution#1551
j-bennet merged 3 commits intodbcli:mainfrom
godtechwak:pgcli/bumhwaklee

Conversation

@godtechwak
Copy link
Contributor

Description

This PR adds a "quiet mode" for named query execution that hides the query text
and only shows the results.

Changes:

  • Added hide_named_query_text configuration option in pgclirc
  • Implemented \nq command to toggle quiet mode at runtime
  • Modified query output logic to hide query text when:
    • Quiet mode is enabled
    • Command is a named query execution (\n <name>)
    • Query executed successfully
  • Applied quiet mode to console output, output files (\o), and log files

Use case: When executing saved named queries, users may want to see only the
results without the query text cluttering the output. This is especially useful
for lengthy queries or when running queries repeatedly, making the output cleaner
and more focused on the actual results.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants